﻿using System;
using System.IO;
using System.Windows.Forms;
using Plugins.Controls;

namespace Plugins.Samples
{
    public partial class DirectoryWindow : PluginWindow
    {
        private StateMachine _stateMachine = new StateMachine();

        public DirectoryWindow()
        {
            InitializeComponent();
        }

        private void PiWindowManager_Load(object sender, EventArgs e)
        {
            LoadOptions("options.xml");
            LoadWindowState();
        }

        private void PiWindowManager_FormClosing(object sender, FormClosingEventArgs e)
        {
            UnloadWindowState();
            UnloadOptions("options.xml");
        }

        private void pluginGradientControl1_Click(object sender, EventArgs e)
        {
            foreach (FileSystemInfo Info in _stateMachine)
            {
                this.pluginGradientControl1.WriteLine(Info.FullName);
            }
        }
    }
}
